The present invention relates to control apparatus for electric vehicles, and in particular to error or fault detection in control apparatus arranged to drive the vehicle.
Electric vehicles are well-known and an example 200 is shown in FIG. 1. The electric vehicle 200 comprises input means 1 which is operable by a user or driver to indicate a desired motion of the vehicle. In the case of electric wheelchairs, the input means is typically a joystick to facilitate control. The joystick generates an X signal indicative of the component of a joystick deflection along a nominal X axis and a Y signal indicative of the component of the deflection along a nominal Y axis. Usually the Y axis is aligned with the forward-reverse axis of the vehicle and movement of the joystick in the X direction corresponds to left-right movement. Thus, the Y signal is indicative of a desired forward-reverse motion of the vehicle and the X signal is indicative of a desired turning motion of the vehicle. The X and Y signals generated by the joystick are usually analogue signals and are transmitted to a controller 3 where they are converted into digital signals XD and YD by an analogue to digital converter (ADC) 31. The digital signals are processed by a microprocessor or microchip 32 which outputs a control signal 91 used to control the speed of a motor 2 arranged to drive a wheel 10 of the vehicle. In FIG. 1, only one motor 2 and one wheel 10 are shown. Typically however, the vehicle will comprise two driven wheels and two corresponding driving motors. Turning motion is achieved by driving the wheels at different respective angular velocities and forward-reverse motion is achieved by driving the two wheels at a common angular velocity.
In general, the control signal 91 is a function of (i.e. it is determined by or calculated from) both the X and Y inputs.
The control signal 91 is used to control circuitry 33 which regulates the supply of power from a battery 4 to the motor 2. The circuitry 33 outputs a further control signal 92, which is a voltage signal applied to the motor.
A problem with the arrangement shown in FIG. 1 is that a fault in the input means, controller hardware or software may affect the motor control signal 92 and may result in the wheel being driven at an inappropriate speed, i.e. the user may lose control. Clearly this is undesirable and may be dangerous.
So-called dual decode joysticks are known which, in addition to generating X and Y signals, also produce nominal inverse outputs Xi and Yi. X and Xi are independently indicative of the X position of the joystick, and similarly Y and Yi are independently indicative of its Y position. Thus, for a given joystick deflection, a dual decode joystick produces two independent signals indicative of the X component of that deflection, and two independent signals indicative of the Y component of the deflection. The xe2x80x9cnormalxe2x80x9d and xe2x80x9cinversexe2x80x9d signals are usually generated in physically separate output circuits. Thus, malfunctions or faults with the joystick hardware can be detected by comparing X with Xi and Y with Yi.
Electric vehicles employing dual decode joysticks are known, and an example is shown in FIG. 2. Normal and inverse X and Y signals are transmitted to the controller 3 where they are converted into corresponding digital signals by the ADC 31. The digital signals then pass to a processor 32. Three nominal processing operations are performed, represented schematically by regions 321, 322 and 323 in the figure. In the first processing operation 322 the normal and inverse X signals XD and XDi are compared. If the signals differ by more than a predetermined value (an error threshold) then an error signal is generated. Similarly in the second processing operation 323 the normal and inverse Y signals are compared and an error signal may be generated. It will be apparent that the apparatus may be designed to respond to an error signal (fault indication) in a number of different ways. For example, the vehicle may be brought to a rest by interrupting the power supply from the battery, by applying a brake, by appropriate control of the circuitry 33, or by other means. the controller may also provide an indication to the user or a service engineer that a joystick fault has developed.
Alternatively, if the normal and inverse signals are within the predetermined range or threshold then the normal X and Y signals are passed to the third processing operation 321 by which the control signal 91 is generated.
Although the use of a dual decode joystick represents an improvement on previous arrangements, there are still problems associated with the control apparatus of FIG. 2. In particular, only faults in the joystick and ADC hardware will be detected. Faults associated with the controller hardware and software still, in general, remain undetected and may result in the incorrect control signal being applied to the motor.
It is therefore desirable to address the problems associated with the prior art.
According to a first aspect of the present invention there is provided control apparatus for an electric vehicle, the apparatus comprising:
input means operable to generate a first signal indicative of a component of a desired motion of the vehicle and a second signal independently indicative of said component;
an electric motor arranged to drive a wheel of the vehicle;
a controller arranged to control the motor according to said first signal; and
means for generating a signal indicative of a voltage across windings of the motor,
the controller further including:
means for calculating a quantity indicative of a nominal expected voltage across said windings according to said second signal;
means for comparing said voltage with said expected voltage; and
means for generating an error signal in response to said voltage and expected voltage differing by more than a predetermined amount.
The means for generating a signal indicative of a voltage across windings of the motor may comprise a voltage dividing circuit and/or a filter circuit and the signal may be proportional to an average voltage developed across the windings. The controller may include a microprocessor which may calculate the expected average voltage (or a quantity proportional to it) from the second signal and, for example, from a preprogrammed quantity indicative of the supply voltage from a battery.
Advantageously, the error or fault signal may be generated in response to any error or fault resulting in a sufficiently large difference between the actual and expected (predicted) voltages developed or seen across the motor windings. Thus, this aspect of the present invention provides an error check on all of the control apparatus, including the input means (eg. a joystick), the controller circuitry and any software, and the motor windings themselves.
As such, it represents a considerable improvement in error detection and safety over the prior art. Errors or faults not affecting the voltage developed across the motor windings are, by definition, less serious from a control/safety point of view.
The input means may be further operable to generate third and fourth signals independently indicative of another component of a desired motion of the vehicle, the controller may be arranged to control the motor (ie its speed and direction of rotation) according to the first and third signals, and the calculating means may calculate the quantity indicative of the expected voltage according to the second and fourth signals.
The motor may be brushless and comprise three phase windings.
According to a second aspect of the present invention there is provided, control apparatus for an electric vehicle the apparatus comprising:
input means operable to generate a first signal indicative of a component of a desired motion of the vehicle and a second signal independently indicative of said component;
an electric motor arranged to drive a wheel of the vehicle; and
a controller responsive to said first signal to control the motor, the controller including
means for generating a control signal to control the motor according to said first signal,
means for calculating a nominal expected value of a parameter of said control signal according to said second signal,
means for comparing said expected value with an actual value of said parameter, and
means for generating a signal indicative of an error in response to said expected and actual values differing by more than a predetermined amount.
The control signal may, for example be a PWM voltage signal used to control switching elements in chopper circuit a PWM voltage signal output from a chopper circuit, or an output voltage from a commutation circuit.
The control signal may be applied directly to a terminal or across terminals (i.e. across windings) of the motor.
The input means may be a joystick and the first and second signals may be indicative of a component of a deflection of the joystick in either the nominal X or nominal Y direction. Advantageously, the second signal may nominally (i.e. provided that the joystick is functioning correctly) be the inverse of the first signal.
Thus, the control signal which is used to determine the speed at which the motor is driven is determined or set according to the first signal, and not the second signal. In contrast to prior art arrangements, rather than comparing the first and second signals (or their digital equivalents) directly, the second input is used to calculate an expected value of a parameter of the control signal, for example its magnitude, its time averaged value or, in the case of the control signal being a pulse with modulated signal, its mark-space ratio or duty cycle. The controller will typically comprise a microprocessor or (microchip) appropriately programmed to allow calculation of the expected value.
The means for comparing the expected and actual values may, for example, compare them directly, or add or subtract them and compare the resultant sum with a predetermined value (amount).
Advantageously, an error signal may be generated in response to a fault, error, or malfunction in the input means hardware, the hardware and software for generating the control signal, and the hardware and software for calculating the expected value. Thus, the control apparatus of the present invention provides more thorough and comprehensive error detection than previous arrangements, and accordingly provides a significant improvement in safety.
Preferably the control signal may be a control voltage applied to one of the motor terminals, or across motor terminals (i.e. a voltage applied across motor windings). Comparing the motor control voltage with an expected value therefore provides an error check on all of the hardware and software up to the motor terminals i.e. all of the hardware and software, from the joystick down, used to control the speed at which the motor is driven. Any fault affecting the motor control voltage should be detected. Of course, any fault not affecting the motor control voltage may not be detected, but by definition, such a fault is not as serious from a control and safety point of view.
According to a third aspect of the present invention there is provided control apparatus for an electric vehicle, the apparatus comprising:
input means operable to generate a first signal indicative of a component of a desired motion of the vehicle and a second signal independently indicative of said component;
an electric motor arranged to drive a wheel of the vehicle; and
a controller responsive to said first signal to control the motor, the controller including
means for generating a control signal to control the motor according to said first signal,
means for generating a signal dependent on said control signal,
means for calculating a nominal expected value of a parameter of the dependent signal according to said second signal,
means for comparing said expected value with an actual value of said parameter, and means for generating a signal indicative of an error in response to said expected and actual values differing by more than a predetermined amount.
For example, the control signal may be a PWM (pulse-width modulated) signal input to a chopper circuit to control the operation of its switching elements. The output of the chopper circuit, itself a PWM voltage, may be applied across terminals of the motor and the dependent signal may be generated using a voltage divider and filter connected across the terminals. Thus, the dependent signal is dependent on the control signal but is also indicative of the actual voltage appearing across the motor windings. By comparing a parameter of the dependent signal with its expected value, faults can be detected not just in the controller hardware and software but in the motor windings also.
Thus, rather than comparing the control signal or a parameter of it with an expected value, in this third aspect a signal is generated or derived that is dependent on the control signal, and then a parameter of the dependent signal is compared with an expected value. The dependent signal may be generated from the control signal or from an actual motor voltage by smoothing, filtering, or time averaging, and the means for generating the dependent signal may include a voltage divider. Again, advantageously this second aspect enables an error or fault check to be made on the hardware and software (including the input means) used to generate and determine the control signal and hence ultimately the voltage applied to the motor.
The input means may be further operable to generate third and fourth signals independently indicative of another component of a desired motion of the vehicle, and the means for generating the controlled signal may generate the control signal according to the first and third signals, and the calculating means may calculate the nominal expected value using the second and fourth signals. The input means may be a dual decode joystick.
In embodiments of the above described aspects of the present invention, the calculation of the nominal expected value may be performed by a microprocessor or microchip already present in the controller and used to generate the control signal. Thus, the improved error or fault detection may be provided without the need for additional hardware compared with prior art arrangements. The calculation of the expected value, comparison with the actual value, and generation of the error signal may be conveniently achieved by making use of previously redundant processing power.
According to a fourth aspect of the present invention there is provided control apparatus for an electric vehicle, the apparatus comprising:
input means operable to generate a first signal indicative of a component of a desired motion of the vehicle and a second signal independently indicative of said component;
an electric motor arranged to drive a wheel of the vehicle; and
a controller responsive to said first and second signals to control the motor, the controller including
means for generating a control signal for controlling the motor according to said first signal,
means for generating a further signal according to said second signal, the further signal being nominally equivalent to or a nominal inverse of said control signal,
means for comparing a parameter of said control signal with a corresponding parameter of said further signal, and
means for generating a signal indicative of an error in response to said parameters differing by more than a predetermined amount.
The control signal and further signal may be generated by separate hardware, or conveniently may both be generated by common hardware present in the controller and necessary for the control of the motor. The control signal may be a pulse with modulated signal generated by a microprocessor according to the first input signal, and the further signal may be an xe2x80x9cinversexe2x80x9d pulse-width-modulated signal generated from the second input signal. The means for comparing may conveniently compare the duty cycle of the control signal with the duty cycle of the further signal. In the art, xe2x80x9cduty cyclexe2x80x9d is used to denote the fraction or percentage of unit time interval at which the pulse-width-modulated voltage is in the xe2x80x9chighxe2x80x9d state, i.e, the duty cycle is related to the mark-space ratio and may be written as duty cycle=mark/(mark+space).
Again, the input means may be further operable to generate third and fourth signals indicative of another component of a desired motion of the vehicle, the control signal may be generated from the first and third signals, and the further signal may be generated from the second and fourth signals.
In embodiments of the above described aspects of the present invention, the control signal may be a pulse-width-modulated voltage signal, and may be an output signal from a chopper circuit. Chopper circuits are well-known and produce a PWM output signal from a constant supply voltage (in the case of electric vehicles, typically from a battery) by appropriate control of switching devices or elements. Alternatively, the control signal may be a PWM signal input to a chopper circuit to control its switching elements.
The motor may comprise brushes and may be controlled by a PWM voltage applied directly across its terminals (i.e. across its windings) or alternatively the motor may be brushless in which case the controller includes commutation circuitry. The control signal may be a voltage signal output from the commutation circuitry.
The control signal may be a voltage signal applied directly to a terminal of the motor, or may be a differential voltage signal applied across terminals of the motor.
The control apparatus may comprise means for measuring or determining the average voltage appearing across the motor terminals. This average voltage will be dependent on the control signal, and may be compared with an expected average voltage calculated by the calculating means.
The motor may be brushless and comprise first, second and third windings, a first end of each winding being connected to a first common point, and a second end of each winding being connected to a respective one of three motor terminals, each motor terminal being connected to a respective output of commutation circuitry included in the controller, each second end being further connected via a respective resistor to a second common point, the second common point being connected to a reference voltage, typically earth, by means of a further resistor and capacitor connected in parallel. The voltage at the second common point is thus indicative of an average voltage across the motor windings, and may be compared with a calculated expected value.
The means for generating a control signal may be further operable to generate a plurality of control signals, and the means for calculating may be further operable to calculate a corresponding plurality of nominal expected values. Each expected value may be compared with a corresponding actual value and an error signal may be generated accordingly.
In other embodiments a plurality of dependent signals may be generated, each corresponding to a respective one of said plurality of control signals, and again each nominal expected value may be compared with a corresponding actual value to determine whether or not to generate an error signal.
In further embodiments a plurality of control signals may be compared with a plurality of corresponding further signals and error signals may be generated accordingly.
Thus, it is possible to compare actual values, or parameters of control signals (or signals derived from control signals) with expected values at a number of points in the control apparatus architecture. This provides the advantage that in addition to simply indicating that a fault or error has occurred, the control apparatus can provide an indication of the location or source of that fault.
In general, between the inputs and outputs of the controller there will be a hierarchy of dependent control signals, and fault diagnosis may be performed at various points in this hierarchy. For example, one level of control signal may be the PWM signal input to a chopper controller to control the operation of its switching elements and a dependent control signal will be the PWM output signal from the chopper.
The control apparatus may further comprise:
means for slowing the vehicle in response to an error signal. This slowing may be achieved, for example, by interrupting the power supply from a battery, by appropriate control of chopper circuitry or commutation circuitry, by applying a brake, or by other suitable means.
According to a fifth aspect of the present invention there is provided a method of controlling an electric vehicle, the method comprising the steps of:
generating a first signal indicative of a component of a desired motion of the vehicle;
generating a second signal indicative of said component;
controlling a motor according to said first signal, the motor being arranged to drive a wheel of the vehicle;
generating a signal indicative of an actual voltage appearing across windings of the motor;
calculating an expected value for the voltage appearing across said windings using the second signal;
comparing the expected voltage with the actual voltage; and
generating an error signal in response to the expected and actual voltages differing by more than a predetermined amount.